<?php $tmp = $hardware->getSoftware(); if(!empty($tmp)): ?>
<table>
<thead>
<tr>
  <th>Kategorie</th>
  <th>Name</th>
  <th>Version</th>
  <th>Bemerkung</th>
  <th></th>
</tr>
</thead>
<tbody>
<?php $last = '' ?>
<?php foreach ($hardware->getSoftware() as $software_item): ?>
<?php if ($software_item->getKategorie()->getName() != $last): ?>
<tr>
	<td valign="top" colspan="5"><?php echo $software_item->getKategorie()->getName() ?></td>
</tr>
<?php endif; ?>
<tr>
	<td></td>
    <td valign="top"><?php echo $software_item->getName() ?></td>
    <td valign="top"><?php echo $software_item->getVersion() ?></td>
    <td valign="top"><?php echo $software_item->getBemerkung() ?></td>
    <td>(<?php echo link_to('X', 'management/deleteSoftware?hid='.$hardware->getId().'&sid='.$software_item->getId().'&id='.$location->getId()) ?>)</td>
  </tr>
<?php $last = $software_item->getKategorie()->getName() ?>  
<?php endforeach; ?>
</tbody>
</table>
<?php else: ?>
<div class="message">Es wurden keine Daten gefunden.</div>
<?php endif; ?>